Channel allocation method, gateway, and terminal device

ABSTRACT

A channel allocation method includes: determining a second channel among idle channels in response to a communication request received from a terminal device over a first channel; and broadcasting a reservation message over the first channel, wherein the reservation message includes second channel information and a reserved communication period, the second channel information is information about the second channel, and the reserved communication period is a time period in which the terminal device is allowed to communicate with the gateway.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority to Chinese PatentApplication No. 202011019231.9, filed on Sep. 24, 2020 and entitled“CHANNEL ALLOCATION METHOD, GATEWAY, AND TERMINAL DEVICE,” thedisclosure of which is herein incorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to the technical field of communications,and in particular, to a channel allocation method, a gateway, and aterminal device.

BACKGROUND

With the development of the Internet of things (IoT) technologies, anincreasing number of devices are supporting wireless communication.According to the basic principles of wireless communication, only onetransmitter device is allowed to transmit data under conditions of thesame moment, the same modulation scheme, and the same frequency in alimited space. Otherwise, mutual interference occurs, and thuscommunication quality is greatly reduced. In this case, a method forappropriately allocating channel resources is required for avoidingcommunication conflicts.

SUMMARY

Embodiments of the present disclosure provide a channel allocationmethod, a gateway, and a terminal device.

At least one embodiment of the present disclosure provides a channelallocation method applicable to a gateway. The method includes:determining a second channel among idle channels in response to acommunication request received from a terminal device over a firstchannel; and broadcasting a reservation message over the first channel,wherein the reservation message includes second channel information anda reserved communication period; wherein the second channel informationis information about the second channel, and the reserved communicationperiod is a time period in which the terminal device is allowed tocommunicate with the gateway.

In some embodiments, the method further includes: returning thereservation message to the terminal device over the first channel.

In some embodiments, the reservation message includes an identifier ofthe terminal device.

In some embodiments, before the determining a second channel among idlechannels, the method further includes: determining whether an idlechannel exists currently; and returning a reservation failure message tothe terminal device in response to determining that no idle channelexists.

In some embodiments, the method further includes: communicating with theterminal device over the second channel in response to a start of thereserved communication period.

In some embodiments, broadcasting the reservation message over the firstchannel includes: broadcasting the reservation message over the firstchannel at a first transmit power; communicating with the terminaldevice over the second channel includes: communicating with the terminaldevice over the second channel at a second transmit power; wherein thefirst transmit power is greater than the second transmit power.

In some embodiments, the first transmit power is at least 6 dBm greaterthan the second transmit power.

In some embodiments, the method further includes: broadcasting a messageabout release of the second channel over the first channel in responseto an expiration of the reserved communication period.

In some embodiments, broadcasting the message about release of thesecond channel over the first channel includes: broadcasting the messageabout release of the second channel over the first channel at a thirdtransmit power; wherein the third transmit power is greater than thesecond transmit power.

In some embodiments, the third transmit power is at least 6 dBm greaterthan the second transmit power.

In some embodiments, broadcasting the message about release of thesecond channel over the first channel includes: broadcasting the messageabout release of the second channel over the first channel for aplurality of times.

In some embodiments, broadcasting the reservation message over the firstchannel includes: broadcasting the reservation message over the firstchannel for a plurality of times.

In some embodiments, the method further includes: receiving areservation message from another gateway; determining a third channeland a reserved communication period of the third channel based on thereservation message from the another gateway, wherein the third channelis a channel occupied by the another gateway; and determining the thirdchannel as an idle channel in response to receiving no message aboutrelease of the third channel within a predetermined duration uponexpiration of the reserved communication period of the third channel.

In some embodiments, the method further includes: updating an idlechannel list, wherein the idle channel list records one of: anidentifier of an idle channel; or an idle period and a non-idle periodof each channel.

At least one embodiment of the present disclosure provides a channelallocation method applicable to a terminal device. The method includes:sending a communication request to a gateway over a first channel; andreceiving, over the first channel, a reservation message broadcast bythe gateway, wherein the reservation message includes second channelinformation and a reserved communication period; wherein the secondchannel information is information about a second channel, the reservedcommunication period is a time period in which the terminal device isallowed to communicate with the gateway, and the second channel isdetermined from idle channels by the gateway.

At least one embodiment of the present disclosure provides a gateway.The gateway includes: a memory, configured to store a set ofinstructions; and at least one processor, configured to execute the setof instructions to perform the method applicable to the gateway asdescribed above.

At least one embodiment of the present disclosure provides a terminaldevice. The terminal device includes: a memory, configured to store aset of instructions; and at least one processor, configured to executethe set of instructions to perform the method applicable to the terminaldevice as described above.

At least one embodiment of the present disclosure provides acommunications system. The communication system includes: at least onegateway and at least one terminal device as described above.

At least one embodiment of the present disclosure provides anon-transitory computer-readable storage medium storing at least one ofprogram code. The program code, when loaded and executed by a processor,causes the processor to perform the channel allocation method applicableto the gateway or the terminal device as described above.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of a communications system;

FIG. 2 is a schematic flowchart of a channel allocation method accordingto an embodiment of the present disclosure;

FIG. 3 is a schematic flowchart of a channel allocation method accordingto an embodiment of the present disclosure;

FIG. 4 is a schematic diagram of allocation of an idle period and anon-idle period of a channel in a channel allocation method according tothe present disclosure; and

FIG. 5 is a schematic diagram of a hardware structure of an electronicdevice according to an embodiment of the present disclosure.

DETAILED DESCRIPTION

For clearer descriptions of the objectives, technical solutions, andadvantages of the present disclosure, the present disclosure isdescribed in further detail hereinafter with reference to specificembodiments and accompanying drawings.

It should be noted that, unless otherwise defined, the technical andscientific terms used in the present disclosure are as they are usuallyunderstood by those skilled in the art to which the disclosure pertains.The terms “first,” “second,” and the like used herein in this text donot denote any order, quantity or importance, but are merely intended todistinguish between different constituents. The terms “comprise,”“include,” and derivatives forms thereof mean that elements or articlesappearing before “comprise” or “include” or their derivative formsinclude the elements or articles and their equivalent elements appearingbehind “comprise” or “include” or their derivative forms, not excludingany other elements or articles.

FIG. 1 is a schematic diagram of a communications system. As shown inFIG. 1, the communications system 100 may include gateways 200/210/220and terminal devices 300/310/320/330/340/350.

As an example, the gateway 200 may select a communication channel andbroadcast a message over the channel. The broadcast message may bereceived by a terminal device or another gateway in the communicationrange of the gateway 200, for example, may be received by the terminaldevices 300, 310, and 320 and the gateway 210.

The gateway 200 may further receive a message over the communicationchannel. For example, the gateway 200 may receive messages from theterminal devices 300, 310, and 320 and the gateway 210 in thecommunication range of the gateway 200.

The terminal devices 330, 340, and 350 and the gateway 220 are incapableof directly communicating with the gateway 200 because these devices arebeyond the communication range of the gateway 200. However, thesedevices are still capable of indirectly communicating with the gateway200, for example, by message forwarding by the gateway 210. Details arenot given herein.

As an example, when the terminal device 310 is in the communicationrange of a certain gateway, the terminal device is capable ofcommunicating with the corresponding gateway. For example, the terminaldevice is capable of communicating with the gateway 200 or the gateway210.

The terminal device 310 is incapable of directly communicating with thegateway 220 because the terminal device 310 is beyond the communicationrange of the gateway 220. However, the terminal device 310 is stillcapable of indirectly communicating with the gateway 220, for example,by message forwarding by the gateway 210. Details are not given herein.

One gateway usually communicates with only one terminal device at afixed moment and frequency using a fixed modulation scheme.Communication channels need to be allocated to prevent signalinterference.

In related technologies, commonly used allocation methods are timedivision multiplexing (TDM), frequency division multiplexing (FDM), codedivision multiple access (CDMA), and the like.

A TDM system occupies only one channel, but its communication efficiencyis low with a plurality of devices taking turns to occupy channels forcommunication. Therefore, the TDM system is suitable only for a scenariowith a high over-the-air data rate or a small amount of data.

An FDM system simultaneously occupies a plurality of channels, and aseparate frequency is allocated for each group of communication.Therefore, the FDM system delivers high communication efficiency.However, channels are severely wasted, and many channel resources areoccupied.

A CDMA system features complicated modulation and demodulation andrequires more hardware resources, resulting in relatively high powerconsumption and costs.

An embodiment of the present disclosure provides a channel allocationmethod applicable to a gateway.

The method includes: determining a second channel among idle channels isdetermined in response to a communication request received from aterminal device over a first channel; and broadcasting a reservationmessage over the first channel, wherein the reservation message includessecond channel information and a reserved communication period; whereinthe second channel information is information about the second channel.The reserved communication period is a time period in which the terminaldevice is allowed to communicate with the gateway.

An embodiment of the present disclosure further provides a channelallocation method applicable to a terminal device.

The method includes: sending a communication request is sent to agateway over a first channel; receiving reservation message broadcast bythe gateway receive over the first channel, wherein the reservationmessage includes second channel information and a reserved communicationperiod; wherein the second channel information is information about asecond channel, the reserved communication period is a time period inwhich the terminal device is allowed to communicate with the gateway,and the second channel is determined from idle channels by the gateway.

In the embodiments of the present disclosure, the gateway receives thecommunication request and broadcasts the reservation message over thefirst channel, and communicates with the terminal device in the reservedcommunication period over another idle channel (such as the secondchannel). When a plurality of terminal devices need to communicate, thegateway may select a plurality of second channels from the idle channelsand separately allocate the second channels to the terminal devices forcommunication with the gateway. Therefore, this method may be employedto implement multi-channel communication and improve communicationefficiency. Each second channel may be used by different terminaldevices in different time periods. Channel resources may beappropriately used by the terminal devices without causing excessiveoccupation and waste of channel resources. In addition, channels areautomatically coordinated based on an idle/non-idle state, and does notneed to be manually grouped or coordinated together by the server. Thisreduces the difficulty in network deployment, better implements channelallocation, and alleviates communication interference.

FIG. 2 is a schematic flowchart of a channel allocation method accordingto an embodiment of the present disclosure.

As shown in FIG. 2, the channel allocation method is applicable to agateway (for example, the gateway 200) and includes the followingprocesses.

In 402, a communication request is received from a terminal device (forexample, terminal device 300) over a first channel.

In this process, when communication is desired, the terminal device 300initiates a communication request to the gateway 200 over the firstchannel. The gateway receives the communication request from theterminal device over the first channel.

As an example, the terminal device 300 and the gateway 200 perform ahandshake first. Then the gateway 200 determines a communicationrequirement of the terminal device 300 based on the communicationrequest from the terminal device 300. If the terminal device 300 doesnot initiate a communication request after the handshake, channelreservation may not be performed.

It should be noted that, in some embodiments, the communication requestdescribed in this process is only a request sent when the terminaldevice initiates a communication requirement, rather than a request fromthe terminal device during actual communication. When a reservedcommunication period starts, an actual communication request of theterminal device is sent over a channel reserved by the gateway for theterminal device. The actual communication request is sent to the gatewayover the reserved channel.

In some embodiments, available channels may be grouped into one primarychannel and several auxiliary channels. These channels are relativelyindependent of each other without mutual interference.

In some embodiments, the first channel serves as the primary channel,which is mainly used by the gateway 200 in receiving communicationrequests from the terminal devices 300, 310, and 320, broadcastingcorresponding reservation messages and release messages, and receivingreservation messages and release messages from another gateway (forexample, the gateway 210).

In response to a start of the communication, the gateway 200 interactswith the terminal device 300 over the primary channel, and the gateway200 receives the communication request of the terminal device 300.

In 404, a second channel among idle channels is determined.

In this process, the idle channel is an unoccupied channel. To bespecific, no terminal device and gateway communicate over the channel.Optionally, the idle channel may be recorded in an idle channel list.That is, the idle channel list records a list of channels that areavailable for channel allocation. In an optional embodiment, the idlechannel list is updated based on channel reservation and release statesof the gateway and channel reservation and release states of anothergateway.

In this process, the gateway 200 may randomly select a channel from theidle channels as the second channel, or may select a channel as thesecond channel based on a preset selection rule. An implementationmethod may be set as required. Details are not provided herein.

In 406, the second channel is reserved based on the communicationrequest, and second channel information and a reserved communicationperiod are returned to the terminal device.

In this embodiment of the present disclosure, reservation means grantingthe right of using the second channel in a period of time to a certainterminal device. For a gateway, a reservation action is represented asupdating an idle channel list of the gateway. For example, the secondchannel is deleted from the idle channel list, or at least one of anidle period and a non-idle period of the second channel is changed inthe idle channel list.

In this process, the second channel information is information relatedto the second channel, for example, a frequency band corresponding tothe second channel and a frequency that meets a preset condition. Thereserved communication period may be a certain period of time in thefuture, or a period of time starting from the current moment. Thereserved communication period includes a start time point (that is, atime point at which the reserved communication period starts) and an endtime point (that is, a time point at which the reserved communicationperiod expires). The preset condition may be set as required.

In another embodiment of the present disclosure, in response toreserving the second channel, the gateway may not perform the action of“returning second channel information and a reserved communicationperiod to the terminal device.”

In 408, a reservation message is broadcast over the first channel,wherein the reservation message includes the second channel informationand the reserved communication period.

In this process, upon completion of the reservation on the secondchannel, the gateway 200 broadcasts the reservation message over thefirst channel to notify another gateway (for example, the gateway 210)and declare the channel occupied.

In some embodiments, the reservation message may be received only byanother gateway (for example, the gateway 210) in the communicationrange of the gateway 200. The communication range of the another gatewayoverlaps the communication range of the gateway 200. Therefore, if thetwo gateways use the same channel for communication, signal interferenceoccurs. The communication range of a gateway (for example, the gateway220) that is beyond the communication range of the gateway 200 does notoverlap the communication range of the gateway 200. Therefore, the twogateways may use the same channel for communication, and signalinterference is not easy to occur.

In some embodiments, in response to receiving the reservation message,the another gateway (for example, the gateway 210) lists thecorresponding second channel as a non-idle channel. When performingchannel reservation, the another gateway does not select the secondchannel for reservation. Another gateway (for example, the gateway 220)that does not receive the reservation message does not list the secondchannel as a non-idle channel because the gateway 200 reserves thesecond channel. (For example, it is possible that the gateway 220reserves the second channel and makes it a non-idle channel.)

In some embodiments, the gateways synchronize channel occupationinformation (determined based on reservation messages and releasemessages) over the first channel (that is, the primary channel) in realtime.

In some embodiments, the gateway 200 broadcasts the reservation messageover the first channel at a relatively high transmit power that isusually 6 dBm greater than the transmit power of a normal signal, suchthat another gateway is capable of receiving the reservation message.

In some embodiments, the reservation message may be broadcast over thefirst channel in the following way.

The reservation message is broadcast over the first channel for aplurality of times at a relatively high transmit power, such thatanother gateway (for example, the gateway 210) in the communicationrange of the gateway 200 is capable of receiving the reservationmessage. In this way, a gateway incapable of receiving the broadcast isnot interfered by the communication and may still use the channel.

In some embodiments, after the reservation message is broadcast over thefirst channel for a plurality of times, the transmit power of thegateway 200 may be lowered to a normal signal level.

In some embodiments, after the reservation message is broadcast over thefirst channel for a plurality of times, the second channel may bedeleted from the idle channel list or the non-idle period of the secondchannel may be specified in the idle channel list.

In another embodiment of the present disclosure, when the terminaldevice also receives a broadcast message, the foregoing reservationmessage may also be received by the terminal device. In an optionalimplementation, the reservation message further includes the identifierof the terminal device. In this case, in 406, the gateway may notperform the action of “returning second channel information and areserved communication period to the terminal device.” The identifier ofthe terminal device in the reservation message specifies the terminaldevice that the second channel is reserved for in the reservedcommunication period. In response to receiving the broadcast, theterminal device is capable of communicating with the gateway over thesecond channel in the reserved communication period.

In one or more embodiments of the present disclosure, the channelallocation method further includes the following process.

In 410, communication is conducted with the terminal device over thesecond channel in response to a start of the reserved communicationperiod.

In this process, when the reversed communication period starts, that is,when the start time point of the reserved communication period arrives,the gateway 200 and the terminal device 300 start communication over thesecond channel.

In some embodiments, the broadcasting a reservation message over thefirst channel includes: broadcasting the reservation message over thefirst channel at a first transmit power.

The communicating with the terminal device over the second channelincludes: communicating with the terminal device over the second channelat a second transmit power.

The first transmit power is greater than the second transmit power.

Herein, the signal transmit power for broadcasting the reservationmessage is greater than the signal transmit power for communicationbetween the gateway and the terminal device, so as to ensure as much aspossible that the reservation message of the gateway may be received byanother gateway. Optionally, the first transmit power is at least 6 dBmgreater than the second transmit power, so as to ensure as much aspossible that the reservation message of the gateway may be received byanother gateway.

In one or more embodiments of the present disclosure, the channelallocation method further includes the following process.

In 412, a message about release of the second channel is broadcast overthe first channel in response to an expiration of the reservedcommunication period.

In this process, when the reserved communication period expires, thatis, when the end time point of the reserved communication periodarrives, the gateway 200 broadcasts the message about release of thesecond channel over the first channel to notify another gateway (forexample, the gateway 210) that the gateway 200 releases the occupationof the second channel.

In some embodiments, the broadcasting a message about release of thesecond channel over the first channel includes: broadcasting the messageabout release of the second channel over the first channel at a thirdtransmit power.

The third transmit power is greater than the second transmit power.

In some embodiments, the message about release of the second channel isbroadcast over the first channel in the following way.

The message about release of the second channel s broadcast over thefirst channel for a plurality of times.

In this case, the channel release message is broadcast at a relativelyhigh transmit power for a plurality of times, such that another gateway(for example, the gateway 210) in the communication range of the gateway200 is capable of receiving the message.

As an example, the third transmit power is at least 6 dBm greater thanthe second transmit power, so as to ensure as much as possible that therelease message of the gateway may be received by another gateway.

In some embodiments, after the message about release of the secondchannel is broadcast over the first channel for a plurality of times,the transmit power of the gateway 200 may be lowered to a normal signallevel.

In some embodiments, after the message about release of the secondchannel is broadcast over the first channel for a plurality of times,the second channel may be added to the idle channel list, or the idleperiod of the second channel may be specified in the idle channel list.

In one or more embodiments of the present disclosure, as shown in FIG.3, the channel allocation method further includes the followingprocesses.

In 502, a reservation message is received from another gateway.

In 504, a third channel and a reserved communication period of the thirdchannel are determined based on the reservation message from the anothergateway, wherein the third channel is occupied by the another gateway.

In 506, the third channel is determined as an idle channel.

As an example, in 506, the occupied channel may be determined as anon-idle channel in the reserved communication period, such that theoccupied channel is still regarded as an idle channel in a time periodbeyond the reserved communication period, and therefore is reserved.

As an example, in addition to recording idle channels, the idle channellist may further record idle periods and non-idle periods of the idlechannels. Alternatively, the idle channel list may further record idleperiods and non-idle periods of non-idle channels. This maximizeschannel utilization.

That is, in an implementation, the idle channel list includesidentifiers of the idle channels, and in another implementation, theidle channel list includes at least one of an idle period and a non-idleperiod of each channel. The idle channel list may be updated accordinglyafter an idle channel, a non-idle channel, or a reserved communicationperiod of a channel is determined.

As an example, in the idle period, if the idle period of the idlechannel is selected for reservation, it may be considered to keep acertain time interval between the reserved communication period and thenon-idle period to avoid signal interference caused at the boundary timepoint of consecutive periods. In addition, the time interval may be usedfor exchanging other information.

As an example, as shown in FIG. 4, a certain channel is reserved inperiods T1 and T2. In this case, when the channel needs to be reserved,for example, in a period T3, a time interval t needs to be kept betweenT3 and T1 to avoid signal interference caused at the boundary time pointof T3 and T1. In addition, time interval t may be used for exchangingother necessary information.

In some embodiments, the channel allocation method further includes thefollowing processes.

In 508, a message about release of the third channel by the anothergateway is received.

In 510, the third channel is determined as an idle channel.

In some embodiments, the channel allocation method further includes thefollowing process:

In 512, the third channel is determined as the idle channel in responseto receiving no message about release of the third channel within apredetermined duration upon expiration of the reserved communicationperiod of the third channel.

In this way, if a channel is occupied for a period of time that exceedsa duration threshold, the gateway automatically considers that thechannel is released. This avoids channel releasing failure cause byinterference or other reasons.

In some embodiments, the channel allocation method further includes:returning a reservation failure message to the terminal device inresponse to determining that no idle channel exists.

As an example, in response to receiving the reservation failure message,the terminal device 300 may send a new communication request to thegateway 200 after a random period of time.

It may be seen from the foregoing embodiments that, in the channelallocation methods according to the embodiments of the presentdisclosure, the first channel is used for handshake and channelreservation, release and synchronization when communication isinitiated. The terminal device may use the first channel to performreservation for communication at any time without following a specifictime window. Upon allocating a channel, the gateway broadcasts a channelreservation message over the first channel to prevent the channel frombeing repeatedly allocated for nearby gateways and terminal devices,thereby avoiding signal interference. The gateway promptly releases thechannel in response to a termination of the communication with theterminal device. According to this channel allocation method, thechannel may be shared in communication of a plurality of gateways freeof mutual interference. In the process, the gateway dynamicallymaintains the idle channel list (that is, a channel occupancy table).

The channel allocation methods according to the embodiments of thepresent disclosure are applicable to scenarios in which low-power andlow-cost terminals transmit and receive large amounts of data. Accordingto the methods, limited channel resources are efficiently utilized , aplurality of gateways are capable of dominating communication incoordination with each other in a limited space, and multi-channelcommunication is adopted to improve communication efficiency. Inaddition, the channels in the present disclosure are automaticallycoordinated by the gateway, and does not need to be manually grouped orcoordinated together by the server. This reduces engineering difficulty.

In one or more embodiments of the present disclosure, a gateway isfurther provided.

The gateway includes: a communication unit, configured to communicatewith a terminal device or a gateway; a memory, configured to store a setof instructions; and at least one processor, configured to execute theset of instructions to implement any embodiment or a permutation orcombination of the embodiments of the channel allocation methodapplicable to the gateway.

In one or more embodiments of the present disclosure, a terminal deviceis further provided.

The terminal device includes: a communication unit, configured tocommunicate with a terminal device or a gateway; a memory, configured tostore a set of instructions; and at least one processor, configured toexecute the set of instructions to implement any embodiment or apermutation or combination of the embodiments of the channel allocationmethod applicable to the terminal device.

FIG. 5 is a schematic diagram of a hardware structure of an electronicdevice according to an embodiment. The electronic device is theforegoing gateway or terminal device. The device may include a processor601, a memory 602, an input/output interface 603, a communicationinterface 604, and a bus 605. The processor 601, the memory 602, theinput/output interface 603, and the communication interface 604 arecommunicatively connected in the device by the bus 605.

The processor 601 may be implemented in the form of a general centralprocessing unit (CPU), a microprocessor, an application specificintegrated circuit (ASIC), or one or more integrated circuits, and isconfigured to execute related programs to implement the technicalsolutions provided in the embodiments of the present disclosure.

The memory 602 may be implemented in the form of a read only-memory(ROM), a random-access memory (RAM), a static storage device, a dynamicstorage device, or the like. The memory 602 may store an operatingsystem and other application programs. When the technical solutionsprovided in the embodiments of the present disclosure are implemented bysoftware or firmware, related program code is stored in the memory 602and called and executed by the processor 601.

The input/output interface 603 is configured to connect an input/outputmodule to implement information input and output. The input/outputmodule may be configured in the device as a component (not shown in thefigure), or may be externally connected to the device to providecorresponding functions. Input devices may include keyboards, mouses,touch screens, a microphone, various sensors, and the like. Outputdevices may include displays, a speakers, vibrators, indicator lights,and the like.

The communication interface 604 is configured to connect a communicationmodule (not shown in the figure) to implement communication andinteraction between the device and other devices. The communicationmodule may implement communication in a wired manner (such as USB ornetwork cable) or a wireless manner (such as mobile network, Wi-Fi, orBluetooth).

The bus 605 includes a path for transmitting information between variouscomponents (such as the processor 601, the memory 602, the input/outputinterface 603, and the communication interface 604) of the device.

It should be noted that although only the processor 601, the memory 602,the input/output interface 603, the communication interface 604, and thebus 605 are shown for the device, in an implementation process, thedevice may further include other components required for normaloperation. In addition, those skilled in the art may understand that thedevice may include only components required for implementing thesolutions in the embodiments of the present disclosure, and notnecessarily include all the components shown in the figure.

An embodiment of the present disclosure further provides anon-transitory computer-readable storage medium storing at least oneprogram code. The program code, when loaded and executed by a processor,causes the processor to perform the channel allocation method shown inFIG. 2 or FIG. 3.

Described above are the specific embodiments of the present disclosure.Other embodiments also fall within the scope of the appended claims. Insome cases, the actions or processes described in the claims may beperformed in orders different from those in the embodiments and stillachieve expected results. In addition, the processes depicted in theaccompanying drawings do not necessarily require the specific orders orsequential orders shown for achieving the expected results. In someembodiments, multitasking and parallel processing are also possible ormay be advantageous.

Those of ordinary skill in the art should understand that the discussionof any of the foregoing embodiments is only exemplary, and is notintended to imply that the scope of the present disclosure (includingthe claims) is limited to these examples. Under the idea of the presentdisclosure, the above embodiments or the technical features in differentembodiments may also be combined, the processes may be performed in anyorder, and many other changes in different aspects of the presentdisclosure are included, which are not provided in the details forbrevity.

In addition, to simplify the description and discussion without makingthe present disclosure difficult to understand, the well-knownpower/ground connections to integrated circuit (IC) chips and othercomponents may or may not be shown in the accompanying drawings. Forease of understanding, the devices may be shown in the form of blockdiagrams. In addition, the details about the implementations of thedevices in the block diagrams are highly dependent on the platform onwhich the present disclosure will be implemented (that is, these detailsshould be fully understandable to those skilled in the art). Whenspecific details (for example, a circuit) are provided to describe theexemplary embodiments of the present disclosure, it is obvious thatthose skilled in the art can implement the present disclosure withoutthese specific details or in case of any changes to these specificdetails. Therefore, these descriptions should be considered illustrativerather than restrictive.

Although the present disclosure has been described with reference to theembodiments of the present disclosure, many substitutions,modifications, and variations of these embodiments will be obvious tothose of ordinary skill in the art based on the foregoing description.For example, other memory architectures, for example, a dynamic RAM(DRAM), may be used in the discussed embodiments.

The present disclosure is intended to cover all such substitutions,modifications, and variations that fall within the broad scope of theappended claims. Any omissions, modifications, equivalent substitutions,improvements, and the like made within the spirit and scope of thepresent disclosure should fall within the protection scope of thepresent disclosure.

What is claimed is:
 1. A channel allocation method, applicable to agateway, the method comprising: determining a second channel among idlechannels in response to a communication request received from a terminaldevice over a first channel; and broadcasting a reservation message overthe first channel, wherein the reservation message comprises secondchannel information and a reserved communication period; wherein thesecond channel information is information about the second channel, andthe reserved communication period is a time period in which the terminaldevice is allowed to communicate with the gateway.
 2. The methodaccording to claim 1, further comprising: returning the reservationmessage to the terminal device over the first channel.
 3. The methodaccording to claim 1, wherein the reservation message comprises anidentifier of the terminal device.
 4. The method according to claim 1,further comprising: communicating with the terminal device over thesecond channel in response to a start of the reserved communicationperiod.
 5. The method according to claim 4, wherein broadcasting thereservation message over the first channel comprises: broadcasting thereservation message over the first channel at a first transmit power;and communicating with the terminal device over the second channelcomprises: communicating with the terminal device over the secondchannel at a second transmit power; wherein the first transmit power isgreater than the second transmit power.
 6. The method according to claim5, wherein the first transmit power is at least 6 dBm greater than thesecond transmit power.
 7. The method according to claim 5, furthercomprising: broadcasting a message about release of the second channelover the first channel in response to an expiration of the reservedcommunication period.
 8. The method according to claim 7, whereinbroadcasting the message about release of the second channel over thefirst channel comprises: broadcasting the message about release of thesecond channel over the first channel at a third transmit power; whereinthe third transmit power is greater than the second transmit power. 9.The method according to claim 8, wherein the third transmit power is atleast 6 dBm greater than the second transmit power.
 10. The methodaccording to claim 7, wherein broadcasting the message about release ofthe second channel over the first channel comprises: broadcasting themessage about release of the second channel over the first channel for aplurality of times.
 11. The method according to claim 1, whereinbroadcasting the reservation message over the first channel comprises:broadcasting the reservation message over the first channel for aplurality of times.
 12. The method according to claim 1, furthercomprising: receiving a reservation message broadcast by anothergateway; determining a third channel and a reserved communication periodof the third channel based on the reservation message broadcast by theanother gateway, wherein the third channel is a channel occupied by theanother gateway; and determining the third channel as an idle channel inresponse to receiving no message about release of the third channelwithin a predetermined duration upon expiration of the reservedcommunication period of the third channel.
 13. The method according toclaim 12, further comprising: updating an idle channel list, wherein theidle channel list records one of: an identifier of an idle channel; orat least one of an idle period and a non-idle period of each channel.14. The method according to claim 1, wherein before determining thesecond channel among idle channels, the method further comprises:determining whether an idle channel exists currently; and returning areservation failure message to the terminal device in response todetermining that no idle channel exists.
 15. A channel allocationmethod, applicable to a terminal device, the method comprising: sendinga communication request to a gateway over a first channel; andreceiving, over the first channel, a reservation message broadcast bythe gateway, wherein the reservation message comprises second channelinformation and a reserved communication period; wherein the secondchannel information is information about a second channel, the reservedcommunication period is a time period in which the terminal device isallowed to communicate with the gateway, and the second channel isdetermined from idle channels by the gateway.
 16. A gateway, comprising:a memory, configured to store at least one program code; and at leastone processor, configured to execute the program code to perform amethod comprising: determining a second channel among idle channels inresponse to a communication request received from a terminal device overa first channel; reserving the second channel, and returning secondchannel information and a reserved communication period to the terminaldevice; and broadcasting a reservation message over the first channel,wherein the reservation message comprises the second channel informationand the reserved communication period.
 17. A terminal device,comprising: a memory, configured to store at least one program code; andat least one processor, configured to execute the program code toperform the method as defined in claim
 15. 18. A communications system,comprising a gateway, and the terminal device as defined in claim 17;wherein the gateway comprises: a memory, configured to store at leastone program code; and at least one processor, configured to execute theprogram code to perform a method comprising: determining a secondchannel among idle channels in response to a communication requestreceived from the terminal device over a first channel; reserving thesecond channel, and returning second channel information and a reservedcommunication period to the terminal device; and broadcasting areservation message over the first channel, wherein the reservationmessage comprises the second channel information and the reservedcommunication period.
 19. A non-transitory computer-readable storagemedium storing at least one program code therein, wherein the programcode, when loaded and executed by a processor, causes the processor toperform the channel allocation method as defined in claim
 1. 20. Anon-transitory computer-readable storage medium storing at least oneprogram code, wherein the program code, when loaded and executed by aprocessor, causes the processor to perform the channel allocation methodas defined in claim 15.